package com.glsc.ngateway.common.base.repo.mysql.opmanage.report.basicsettings;

import com.glsc.ngateway.common.base.domain.mysql.opmanage.report.basicsettings.AssetPoolList;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

public interface AssetPoolListRepo extends JpaRepository<AssetPoolList, Long>, JpaSpecificationExecutor<AssetPoolList>{

    @Transactional
    @Modifying
    @Query(value = "delete from AssetPoolList t where t.assetPoolId = :assetPoolId")
    void removeByAssetPoolId(@Param("assetPoolId") long assetPoolId);
}
